package cn.tedu.blog.server.pojo.vo;

import cn.tedu.blog.server.utils.DateUtils;
import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.io.Serializable;
import java.time.LocalDateTime;
import java.util.List;

 /**
 * @author 雷茂林
 * @description: 角色表
 * @date
 */
@Data
@EqualsAndHashCode(callSuper = false)
@TableName("b_role")
@ApiModel(value="角色管理")
public class RoleListVO implements Serializable {

    @ApiModelProperty(value = "角色ID")
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    @ApiModelProperty(value = "角色名称")
    private String name;

    @ApiModelProperty(value = "角色描述")
    private String description;

    @ApiModelProperty(value = "排序")
    private Integer sort;

    @ApiModelProperty(value = "角色状态",name = "status",example = "1")
    private Integer status;

    //FieldFill.INSERT：添加时自动填充实现
    @ApiModelProperty(value = "创建时间")
    @TableField(fill = FieldFill.INSERT)
    @JsonFormat(pattern = DateUtils.FORMAT_STRING,timezone="GMT+8")
    private LocalDateTime gmtCreate;

    //FieldFill.UPDATE：修改时自动填充实现
    @ApiModelProperty(value = "修改时间")
    @TableField(fill = FieldFill.UPDATE)
    @JsonFormat(pattern = DateUtils.FORMAT_STRING,timezone="GMT+8")
    private LocalDateTime gmtModified;

    @TableField(exist = false)
    private List<Integer> menus;


    @TableField(exist = false)
    private LocalDateTime updateTimeStart;


    @TableField(exist = false)
    private LocalDateTime updateTimeEnd;


    @TableField(exist = false)
    private Integer pageNum;


    @TableField(exist = false)
    private Integer pageSize;
}
